@extends('Layout/adminBase')
@section('css')
<link rel="stylesheet" type="text/css" href="{{asset('/bootstrap/css/bootstrap.min.css')}}">
<style type="text/css">
    tr{
        text-align: center;
    }
    tr th{
         text-align: center;
    }
</style>
@endsection
@section('body')
<div class='container'>
    <table class="table table-condensed table-bordered table-striped">
        <caption>前台日志</caption>
        <thead>
            <tr>
                <th>序号</th>
                <th>操作者</th>
                <th>类型</th>
                <th>操作内容</th>
                <th>IP</th>
                <th>时间</th>
            </tr>
        </thead>                
        <tbody>
            @foreach ($result as $k => $v) 
                <tr>
                    <td>{{ $k+1 }}</td>
                    <td>{{ $v['username'] }}</td>
                    <td>{{ $type[$v['type']] }}</td>
                    <td>{{ $v['content'] }}</td>
                    <td>{{ $v['IP'] }}</td>
                    <td>{{  date('Y-m-d H:i:s',$v['addtime']) }}</td>
                </tr>
            @endforeach
        </tbody>
    </table>
    {{ $result->links() }}
</div>
@endsection
